<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/就业班课程/大事件/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/就业班课程/大事件/assets/css/artList.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header artHead">
            <span>文章类别管理</span>
        </div>
        <!-- 筛选区域开始 -->
        <form class="layui-form" id="filterForm">
            <div class="layui-form-item layui-inline">
                <select name="cate_id" lay-verify="required">
                </select>
            </div>
            <div class="layui-form-item layui-inline">
                <select name="state">
                    <option value="">所有状态</option>
                    <option value="已发布">已发布</option>
                    <option value="草稿">草稿</option>

                </select>
            </div>
            <div class="layui-form-item layui-inline">
                <button class="layui-btn" lay-submit lay-filter="formDemo">筛选</button>
            </div>
        </form>

        <!-- 筛选区域结束 -->
        <!-- 列表区域开始 -->
        <div class="layui-card-body">

            <table class="layui-table">
                <colgroup>
                    <col>
                    <col>
                    <col width="300">
                    <col width="200">
                    <col width="200">
                </colgroup>
                <thead>
                    <tr>
                        <th>文章标题</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="artListTb">

                </tbody>
            </table>
        </div>
        <!-- 列表区域结束 -->
        <!-- 分页区域开始 -->

        <div id="pageBox"></div>


        <!-- 分页区域结束 -->


    </div>
    <script src="/就业班课程/大事件/assets/lib/layui/layui.all.js"></script>
    <script src="/就业班课程/大事件/lib/jquery.js"></script>
    <script src="/就业班课程/大事件/assets/js/baseApi.js"></script>
    <script src="/就业班课程/大事件/assets/lib/template-web.js"></script>
    <script src="/就业班课程/大事件/assets/js/artList.js"></script>


    <!-- 文章列表模板 -->
    <script type="text/html" id="tpl-table">
    {{each data}}
    <tr>
        <td>{{$value.title}}</td>
        <td>{{$value.cate_name}}</td>
        <td>{{$value.pub_date|dateFormat}}</td>
        <td>{{$value.state}}</td>
        <td>
            <button type="button" class="layui-btn layui-btn-xs" id="editList" data-id='{{$value.Id}}'>编辑</button>
            <button type="button" class="layui-btn layui-btn-xs  layui-btn-danger" data-id='{{$value.Id}}' id="removeList">删除</button>
        </td>
    </tr> 
    {{/each}}
    </script>
    <!-- 分类可选项的模板结构 -->
    <script type="text/html" id="tpl-cate">
        <option value="">所有分类</option>
        {{each data}}
        <option value="{{$value.Id}}">{{$value.name}}</option>
        {{/each}}
    </script>


</body>

</html>